import {useEffect} from "react";
import useFactorStore from "../store/useFactorStore";
const Factor = () => {
    console.log('Factor组件渲染 ...');
    const {tableData,setTableData} = useFactorStore();

    useEffect(() => {
        setTableData();
    }, []);
    return (
        <div>
            <p>列表数据</p>
            <ul>
                {
                  tableData.map(item => <li key={item.id}>{item.name}</li>)
                }
            </ul>
        </div>
    )
}

export default Factor;